/*  Copyright (C) 2008  Alexander Blyzniuchenko (BlezAlex)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace MediaDC
{
    public class PreviewAssociation
    {
        public enum Mode { Stream, TempFile }

        private string _exts;
        [DisplayName("File Extensions(avi;mov)")]
        public string Exts
        {
            get { return _exts; }
            set { _exts = value; }
        }

        private string _typeName = "A file type";
        public string TypeName
        {
            get { return _typeName; }
            set { _typeName = value; }
        }

        private Mode _previewMode;
        public Mode PreviewMode
        {
            get { return _previewMode; }
            set { _previewMode = value; }
        }

        private static List<Mode> _modes;
        public static List<Mode> Modes
        {
            get
            {
                if (_modes == null)
                {
                    _modes = new List<Mode>();
                    foreach (Mode m in Enum.GetValues(typeof(Mode)))
                    {
                        _modes.Add(m);
                    }
                }
                return _modes;
            }
        }

        private string _application;
        [EditorAttribute(typeof(ExecutableFileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
        public string Application
        {
            get { return _application; }
            set { _application = value; }
        }

        public override string ToString()
        {
            return TypeName;
        }
    }
}
